<!-- 用户列表 -->
<?php $rand = round(microtime(true),3)*1000;?>
<table id="userList_{$rand}" class="easyui-datagrid" title="{$currentpos}" data-options="
	fit:true,rownumbers:true,animate:true,fitColumns:true,
	url:'{:U('Redbag/userList',array('uid'=>I('uid',0)))}',idField:'uid',border:false,
	toolbar:'#userToolbar_{$rand}',pagination:true,singleSelect:true">
    <thead>
    <tr>
        <th data-options="field:'headsmall',width:20,align:'center',formatter:buildFace">头像</th>
        <th data-options="field:'nickname',width:20,align:'center'">昵称</th>
        <th data-options="field:'give_score',width:10,align:'center'">已发红包</th>
        <th data-options="field:'recieve_score',width:20">已领红包</th>
        <th data-options="field:'tk_score',width:20">红包退款</th>
        <th data-options="field:'zc_score',width:20">转出</th>
        <th data-options="field:'zr_score',width:20">转入</th>
        <th data-options="field:'cz_score',width:20">充值</th>
        <th data-options="field:'tx_score',width:20">提现</th>
        <!--<th data-options="field:'uid',width:20,formatter:userOperateText">操作</th>-->
    </tr>
    </thead>
</table>

<div id="userToolbar_{$rand}" style="padding:5px;height:auto">
    <form id="userSearchForm_{$rand}">
        <a href="javascript:;" onclick="userRefreshList_{$rand}();" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true">刷新</a>
    </form>
</div>




<script type="text/javascript">
    //刷新
    function userRefreshList_{$rand}(){
        $('#userList_{$rand}').datagrid('reload');
    }
    //头像显示
    function buildFace(val,row,index){
        if(!val){
            return '<div style="height:60px;padding:3px;margin:auto;"></div>';
        }else{
            return '<div style="padding:3px;"><img src="'+val+'" height="60" style="padding:1px;border:1px solid #ccc;"></div>';
        }
    }
    //操作格式化
    function userOperateText(val, row, index){
        var btn = [];
//        btn.push('<a href="javascript:void(0);" onclick="userEdit('+val+')">查看详情</a>');
        return btn.join(' | ');
    }
</script>